ui:use('busi_bs_class_gantt');--引用甘特图公共脚本

--定义甘特图
local m_pGantt = CLuaGantUtil();
m_pGantt:SetGant(ui:getDialogName(), 'id_gantt');

local ganttBusi = CLuaGanttBusi:create();
local dtFrom = '';
local dtTo = '';

--后30天的日期范围
dtFrom = cutil:getTodayStart();
dtTo = cutil:getPreDay(30);

--基类初始化
ganttBusi:init(m_pGantt, dtFrom, dtTo);

--重新换左侧设备
local sEqpt = "";
local helpEqpt = CSelectHelp();

--helpEqpt的值需要SQL查询获取
for i=0,helpEqpt:size()-1 do 
    if i== helpEqpt:size()-1 then
        sEqpt = sEqpt .. helpEqpt:valueString(i,'eqpt_id') ;
    else
        sEqpt = sEqpt .. helpEqpt:valueString(i,'eqpt_id') .. ',';
    end
end

ganttBusi:set_gantt_eqpt(sEqpt);
local help = CSelectHelp();
help = ganttBusi:get_gantt_eqpt();

help:dump();

--更新时间
ganttBusi:update_gantt(dtFrom,dtTo);
Copyright © TouchNet 2015 all right reserved,powered by Gitbook最后修订时间: 2022-06-21 09:21:04

results matching ""

    No results matching ""